package org.grapes.wine.api.client.method.impl;

import java.io.IOException;
import java.util.HashMap;
import java.util.Map;

import org.grapes.wine.api.bean.GetFeaturedCourseIntroductionBean;
import org.grapes.wine.api.client.exception.WineException;
import org.grapes.wine.api.method.EWineMethod;
import org.grapes.wine.api.method.iface.IMethodGetFeaturedCourseIntroduction;
import org.xml.sax.SAXException;

public class MethodGetFeaturedCourseIntroduction extends CallWineMethod
		implements IMethodGetFeaturedCourseIntroduction {

	public MethodGetFeaturedCourseIntroduction(String apiId, String sessionKey, String sig, String serverUrl) {
		super(apiId, sessionKey, sig, serverUrl);
		// TODO Auto-generated constructor stub
	}

	public String getFeaturedCourseIntroduction(String featuredCourseName) {
		Map param = new HashMap();
		param.put("featuredCourseName", featuredCourseName);
		try {
			GetFeaturedCourseIntroductionBean bean = (GetFeaturedCourseIntroductionBean) callMethod(
					EWineMethod.GET_FEATURED_COURSE_INTRODUCTION, param);
			return bean.getFeaturedCourseIntroduction();
		} catch (WineException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (SAXException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return null;
	}
}
